home *** CD-ROM | disk | FTP | other *** search
/ TENTEN Mental Arithmetic / TENTEN Mental Arithmetic.iso / mouse / install.bat < prev    next >
DOS Batch File  |  1993-11-09  |  5KB  |  122 lines

  1. echo off
  2. cls
  3.  
  4. if "%1" == "" goto NEEDDRIVE
  5. if %1 == c: goto MKDIR
  6. if %1 == C: goto MKDIR
  7. if %1 == d: goto MKDIR
  8. if %1 == D: goto MKDIR
  9. if %1 == e: goto MKDIR
  10. if %1 == E: goto MKDIR
  11. if %1 == f: goto MKDIR
  12. if %1 == F: goto MKDIR
  13. if %1 == g: goto MKDIR
  14. if %1 == G: goto MKDIR
  15. if %1 == h: goto MKDIR
  16. if %1 == H: goto MKDIR
  17. if %1 == i: goto MKDIR
  18. if %1 == I: goto MKDIR
  19.  
  20. :INVALID
  21. echo "%1" is an invalid drive name.  Please enter your startup drive's
  22. echo letter followed by a colon":"
  23. echo For example:
  24. goto Example
  25.  
  26. :NEEDDRIVE
  27. echo Please specify your startup drive to install MOUSE, for example:
  28. goto Example
  29.  
  30. :EXAMPLE
  31. echo  
  32. echo         install c:
  33. goto End
  34.  
  35. :MKDIR
  36. cls
  37. echo ╔════════════════════════════════════════════════════════════════════╗
  38. echo ║                                                                    ║
  39. echo ║                      Mouse Installation                            ║
  40. echo ║                                                                    ║
  41. echo ║                                                                    ║
  42. echo ║       This program will install the mouse drivers into             ║
  43. echo ║       a directory called "Mouse" on your startup drive %1.         ║
  44. echo ║       If you do not wish to do this press Ctrl-C now.              ║
  45. echo ║                                                                    ║
  46. echo ║                                                                    ║
  47. echo ╚════════════════════════════════════════════════════════════════════╝
  48. echo  
  49. pause
  50. echo  
  51.  
  52. if exist %1\mouse\*.* goto DIREXIST
  53. mkdir %1\mouse
  54. goto COPYFILES
  55.  
  56. :DIREXIST
  57. echo WARNING:  The directory %1\MOUSE already exists.  Press Ctrl-C
  58. echo           now if you don't want to overwrite the contents of
  59. echo           that directory.
  60. echo  
  61. pause
  62. echo  
  63.  
  64. :COPYFILES
  65. echo Copying files to %1\MOUSE...
  66. copy *.* %1\mouse >nul
  67.  
  68. if not exist %1\mouse\mouse.com goto InstallError
  69. if not exist %1\mouse\mouse.sys goto InstallError
  70. if not exist %1\mouse\manual.txt goto InstallError
  71.  
  72. cls
  73. echo ╔══════════════════════════════════════════════════════════════════════╗
  74. echo ║                                                                      ║
  75. echo ║     MOUSE has been successfully installed onto your hard disk.       ║
  76. echo ║     INSTALL will update your autoexec.bat file. Your current         ║
  77. echo ║     AUTOEXEC.BAT file will be renamed AUTOEXEC.BAK. If you don't     ║
  78. echo ║     want INSTALL to modify your autoexec.bat file press Ctrl-C now.  ║
  79. echo ║                                                                      ║
  80. echo ╚══════════════════════════════════════════════════════════════════════╝
  81. pause
  82. echo Updating AUTOEXEC.BAT.....
  83. %1
  84. cd\
  85. if not exist autoexec.bat goto NoAutoexec
  86. copy autoexec.bat autoexec.bak
  87. copy autoexec.bat + %1\mouse\mouse.bat temp.bat > NUL
  88. del autoexec.bat
  89. ren temp.bat autoexec.bat
  90.  
  91. echo ╔══════════════════════════════════════════════════════════════════════╗
  92. echo ║                                                                      ║
  93. echo ║     Please reboot your computer. Your AUTOEXEC.BAT file will         ║
  94. echo ║     install the mouse driver for you.You should run the TEST         ║
  95. echo ║     program to test your mouse.                                      ║
  96. echo ║                                                                      ║
  97. echo ║     To view the on-disk user's guide, change to your MOUSE           ║
  98. echo ║     directory and type:                                              ║
  99. echo ║                                                                      ║
  100. echo ║           BROWSE MANUAL.TXT                                          ║
  101. echo ║                                                                      ║
  102. echo ║     and press ENTER.                                                 ║
  103. echo ║                                                                      ║
  104. echo ╚══════════════════════════════════════════════════════════════════════╝
  105. goto End
  106.  
  107. :NOAUTOEXEC
  108. echo Your %1 drive root directory does not contain the batch file
  109. echo AUTOEXEC.BAT. This file is executed by DOS when you power up your
  110. echo computer. Please consult your DOS manual for information on
  111. echo how to create one.
  112. goto END
  113.  
  114. :INSTALLERROR
  115. echo ERROR: Installation of MOUSE into %1\MOUSE was unsuccessful.
  116. echo        The mouse drivers were not copied to your startup
  117. echo        drive %1. This might be because %1 is full.
  118. echo        Mouse drivers need at least 34K of free disk space
  119.  
  120. :End
  121.  
  122.